<template>
  <div class="page-404">
    <div class="show">
      <img
        src="../static/404.png"
        alt=""
      >
      <div class="p">
        网络连接失败，请检查网络连接
      </div>
    </div>
    <div
      class="btn"
      @click="Refresh"
    >
      刷新重试
    </div>
  </div>
</template>

<script>
export default {
	name: "Pgae404",
	data(){
	  return{
	    tabbar_path:["pages/Index","pages/TsDemo"]
		};
	},
	methods:{
		Refresh(){

			let path = uni.getStorageSync("path");
			for(let i of this.tabbar_path){
			  if(path.indexOf(i)>=0){
			    uni.switchTab({
						url:path
					});
					return;
				}
			}
			uni.redirectTo({
				url: path
			});
		},
	}
};
</script>

<style scoped lang="scss">
.page-404{
  background-color: #fff;
  .show{
    padding-top: 300rpx;
    text-align: center;
    img{
      width: 256rpx;
      height: 256rpx;
    }
    .p{
      font-size: 27rpx;
      font-family: PingFang SC;
      font-weight: 600;
      color: rgba(21, 21, 23, 1);
      margin-top: 30rpx;
    }
  }
  .btn{
    display: inline-block;
    width: 578rpx;
    height: 78rpx;
    background: rgba(255, 133, 100, 1);
    border: 2rpx solid rgba(255, 255, 255, 1);
    border-radius: 13rpx 13rpx 13rpx 6rpx;
    font-size: 30rpx;
    font-weight: bold;
    color: rgba(254, 254, 254, 1);
    text-align: center;
    line-height: 78rpx;
    margin: 50rpx 86rpx;
    letter-spacing: 10rpx;
  }
}
</style>